package io.qiezi.scala.secrets

trait A1 {
  val foo: Int
  val bar = 10
  println(s"In A: foo = $foo, bar = $bar")
}

class B extends A1 {
  val foo: Int = 25
  println(s"In B: foo = $foo, bar = $bar")
}

class C extends B {
  override val bar: Int = 99
  println(s"In C: foo = $foo, bar = $bar")
}

object InheritDemo {
  def main(args: Array[String]): Unit = {
    new C()
  }
}
